package com.service.NotificationListenerService.Meng;

import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;

public class NListenerService extends NotificationListenerService {

    public static OnListener onListener;

    public NListenerService() {
        if(onListener!=null) onListener.onCreate();
    }

    @Override
    public void onNotificationPosted(StatusBarNotification sbn) {
        if(onListener!=null) onListener.onPosted(sbn);
    }

    @Override
    public void onNotificationRemoved(StatusBarNotification sbn) {
        if(onListener!=null) onListener.onRemoved(sbn);
    }
    
    public interface OnListener {
        void onCreate();
        void onPosted(StatusBarNotification sbn);
        void onRemoved(StatusBarNotification sbn);
    }

}